#!/bin/bash

# Find the process IDs of guoxin_jinzheng
PIDS=$(pgrep guoxin_jinzheng)

# Check if any processes were found
if [ -z "$PIDS" ]; then
  echo "guoxin_jinzheng is not running."
  exit 0
fi

# Kill each process individually
for PID in $PIDS; do
  echo "Stopping process $PID..."
  kill -9 "$PID"
  if [ $? -eq 0 ]; then
    echo "Process $PID has been stopped."
  else
    echo "Failed to stop process $PID."
  fi
done

# Print a completion message
echo "All guoxin_jinzheng processes have been stopped."